#ifndef WEBENGINEVIEW_H
#define WEBENGINEVIEW_H

#include <QWebEngineView>
#include <keypresseater.h>

class MediaWikiWindow;
class WebEngineView : public QWebEngineView
{
public:
    WebEngineView(QWidget* parent = Q_NULLPTR);

    void showMax();
    void showOrigin();

    void setOrigin_ui(MediaWikiWindow *newOrigin_ui);

private:
    MediaWikiWindow *m_origin_ui;

    // QWidget interface
protected:
    virtual void focusInEvent(QFocusEvent *event) override;
    virtual void focusOutEvent(QFocusEvent *event) override;

    KeyPressEater *keypress;

    // QWebEngineView interface
protected:
    virtual QWebEngineView *createWindow(QWebEnginePage::WebWindowType type) override;
};

#endif // WEBENGINEVIEW_H
